// const api = process.env.NODE_ENV == 'development' ? 'https://fu.icebartech.com/' : 'http://api.chuangchao.org/'
let config = require('../config/config.js')
let arr = location.hostname.split('.');
let urlName = arr[0] == 'www'?arr[1]:arr[0];
let api = config.urlObjs[urlName].url
console.log(api)
module.exports = {
  //管理员
  ADMIN: {
    LOGIN: api + 'user/login', //登录接口
    MODIFYPWD: api + 'user/updUserPWD' ,//重置密码接口
    LOGOUT:api+'user/logout',//登出
    CHECK:api+'pc/user/checkCompanyName',//,
    CHANGE:api+'pc/user/modifyPwd'
  },
  WEB:{
    FINDBANNERBYPAGE:api+'pc/adv/findAppBannerByPage',
    GETCODE:api+'pc/common/randomCode',
    FINDMOBILECODE:api+'pc/user/findMobileCode',
    FINDPWD:api+'pc/user/findPwd',
    MODIFYPWD:api+'pc/user/modifyPwd',
    LOGIN:api+'pc/user/pcLogin',
    REGISTER:api+'pc/user/pcRegister',
    FINDPRODUCTBYPAGE:api+'pc/financingProduct/findFinancingProductByPage',
    FINDPRODUCTBYID:api+'pc/financingProduct/findFinancingProductById',
    FINDUSERBASEDETAILBYID:api+'pc/companyUser/findUserBaseDetailById',
    CHECKCODE:api+'pc/user/checkMobileCode',
    FINDSTOCKLIST:api+'pc/userCompanyStock/findUserCompanyStockList',
    SAVESTOCKLIST:api+'pc/userCompanyStock/saveUserCompanyStock',
    FINDLINCESTATE:api+'pc/companyUser/findUserLicenceFlag',
    FINDFINANCEBYPAGE:api+'pc/financingProduct/findChannelFinancingProductByPage',
    FINDCHANNELBASEID:api+'pc/companyUser/findChannelBaseById'
  },
  BASE:{
    DICTIONARY:api+'base/sys/loadDictionary',
    RANDOMCODE:api+'base/verifyCode/randomCode',
    ADMINUPLOAD:api+'base/sys/appUploadFile'
  },
  SYSTEM:{
    FINDUSERBASEDETAIL:api+'pc/companyUser/findUserBaseDetailById',
    SAVEUSERBASEDETAIL:api+'pc/companyUser/saveUserBaseDetail',
    APPLYPRODUCT:api+'pc/order/applyFinancingProduct',
    FINDCHANNELUSER:api+'pc/companyUser/findChannelUsers',
    USERORDER:api+'pc/order/findUserOrderByPage',
    DISPATCHUSERORDER:api+'pc/dispatchOrder/findDispatchUserOrderByPage',
    STEPLIST:api+'pc/order/findOrderStepList',
    ORDERDETAIL:api+'pc/order/findUserOrderDetail',
    QUESTIONLIST:api+'pc/order/findUserOrderQuestionList',
    SUBMITANSWER:api+'/pc/order/saveUserOrderAnswer',
    FINDUSERFINANCINGAUTH:api+'pc/financingAuth/findLastUserFinancingAuth',
    SAVEFINANCINGAUTH:api+'pc/financingAuth/saveFinancingAuth',
    FINDSTOCKLIST:api+'pc/userStock/findUserStockList',
    SAVESTOCKLIST:api+'pc/userStock/saveUserStock',
    SAVEINFOEDIT:api+'pc/userFinance/saveUserFinanceOtherSheet',
    FINDUSERCANFINANCING:api+'pc/financingAuth/findUserCanFinancing',
    FINDUSERFINANCEDETAIL:api+'pc/userFinance/findUserFinanceDetailByFinanceId',
    FINDFINANCEYEARLIST:api+'pc/userFinance/findFinanceYearList',
    SAVEFINANCEBALANCESHEET:api+'pc/userFinance/saveFinanceBalanceSheet',
    SAVEUSERFINACE:api+'pc/userFinance/saveUserFinance',
    SAVEUSERFINANCECASHFLOW:api+'pc/userFinance/saveUserFinanceCashflowSheet',
    SAVEUSERFINANCEPROFIT:api+'pc/userFinance/saveUserFinanceProfitSheet',
    FINDUSERBUSSINESSPLAN:api+'pc/businessPlan/findUserBusinessPlan',
    SAVEBUSSINESSPLAN:api+'pc/businessPlan/saveUserBusinessPlan',
    FINDUSERDETAIL:api+'pc/userQues/findUserQuestDetail',
    FINDUSERQUESTYEAR:api+'pc/userQues/findUserQuestYear',
    SAVEUSERQUESTION:api+'pc/userQues/saveUserQuestion',
    BANKORDERDETAIL:api+'pc/dispatchOrder/findDispatchUserOrderDetail',
    USERLIST:api+'pc/companyUser/findUserListByUserType',
    PRODUCTLIST:api+'pc/financingProduct/findFinancingProductByAll',
    LOADDICTIONARY:api+'base/sys/loadDictionary',
    ADDQUESTION:api+'pc/dispatchOrder/saveDispatchUserOrderQuestion',
    ORDERBANKLOAN:api+'pc/bankLoan/findUserOrderBankLoanByPage',
    RADIOS:api+'pc/dispatchOrder/findCommentRadiosByStepKey',
    ROTATE:api+'pc/dispatchOrder/saveDispatchUserOrderComment',
    FINDUSERLOAN:api+'pc/userLoan/findUserLoanList',
    SAVELOAN:api+'pc/userLoan/saveUserLoan',
    ROTATEMESSAGE:api+'pc/showTip/findUserShowTips',
    SUBBANKLIST:api+'pc/bankUser/findBankUserSubBankList',
    ONOFFSUBBANK:api+'pc/bankUser/onOrOffSubBank',
    SAVESUBBANK:api+'pc/bankUser/saveBankUserSubBank',
    SUBBANKDETAIL:api+'pc/bankUser/findBankUserSubBankById',
    FINANCIALBALANCESHEET:api+'pc/userFinance/findUserFinanceBalanceSheetByPage',
    FINANCIALINDEX:api+'pc/userFinance/findUserFinanceIndexByPage',
    FINANCIALPROFIT:api+'pc/userFinance/findUserFinanceProfitSheetByPage',
    FINANCIALOTHER:api+'pc/userFinance/findUserFinanceOtherSheetByPage',
    FINANCIALCASHFLOW:api+'pc/userFinance/findUserFinanceCashflowSheetByPage',
    FINDBALANCEDETAIL:api+'pc/userFinance/findUserFinanceBalanceSheetByDetail',
    FINDPROFITDETAIL:api+'pc/userFinance/findUserFinanceProfitSheetByDetail',
    FINDCASHFLOWDETAIL:api+'pc/userFinance/findUserFinanceCashflowSheetByDetail',
    FINDOTHERSHEETDETAIL:api+'pc/userFinance/findUserFinanceOtherSheetByDetail',
    FINDCURRENTCOMPANY:api+'pc/financeAssociation/findCurrentAssociationCompany',
    SAVEASSOCIATION:api+'pc/financeAssociation/saveAssociationCompany'
  },
  CHANNEL:{
    FINDUSERDETAIL:api+'channel/userQues/findUserQuestDetail',
    FINDUSERQUESTYEAR:api+'channel/userQues/findUserQuestYear',
    FINDUSERLOAN:api+'channel/userLoan/findUserLoanList',
    FINDSTOCKLIST:api+'channel/userCompanyStock/findUserCompanyStockList',
    FINDCOMPANYBYPAGE:api+'channel/companyUser/findCompanyUserByPage',
    FINDUSERBASEDETAIL:api+'channel/companyUser/findUserBaseDetailById',
    ONOROFFUSER:api+'channel/companyUser/onOrOffUser',
    SAVEOTHERUSERBASEDETAIL:api+'channel/companyUser/saveUserBaseDetail',
    FINDUSERSTOCKLIST:api+'channel/userStock/findUserStockList',
    SAVEUSERSTOCK:api+'channel/userStock/saveUserStock',
    FINDFINANCEDETAIL:api+'channel/userFinance/findUserFinanceDetailByFinanceId',
    SAVEFINANCEBALANCESHEET:api+'channel/userFinance/saveFinanceBalanceSheet',
    SAVEUSERFINANCE:api+'channel/userFinance/saveUserFinance',
    SAVEFIANCESHEET:api+'channel/userFinance/saveUserFinanceCashflowSheet',
    SAVEFIANCEPROFITSHEET:api+'channel/userFinance/saveUserFinanceProfitSheet',
    FINDBUSSINESSPLAN:api+'channel/businessPlan/findUserBusinessPlan',
    SAVEBUSSINESSPLAN:api+'channel/businessPlan/saveUserBusinessPlan',
    FINDUSERFINANCINGAUTH:api+'channel/financingAuth/findLastUserFinancingAuth',
    SAVEFINANCINGAUTH:api+'channel/financingAuth/saveFinancingAuth',
    FINDUSERCANFINANCING:api+'channel/financingAuth/findUserCanFinancing',
    FINDFINANCEYEARLIST:api+'channel/userFinance/findFinanceYearList',
    FINANCIALBALANCESHEET:api+'channel/userFinance/findUserFinanceBalanceSheetByPage',
    FINANCIALINDEX:api+'channel/userFinance/findUserFinanceIndexByPage',
    FINANCIALPROFIT:api+'channel/userFinance/findUserFinanceProfitSheetByPage',
    FINANCIALOTHER:api+'channel/userFinance/findUserFinanceOtherSheetByPage',
    FINANCIALCASHFLOW:api+'channel/userFinance/findUserFinanceCashflowSheetByPage',
  }
}
